<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/10/30
 * Time: 16:37
 */

namespace app\admin\validate;


use think\Validate;

class Article extends Validate
{
    protected $rule = [
        'arttitle' => 'require|max:35',
        'cataid' => 'require',
    ];
    protected $message = [
        'arttitle.require' => '文章标题必须填',
        'arttitle.max' => '文章标题最多不能超过35个字符',
        'cataid.require' => '所属栏目必须选择',
    ];
    protected $scene =[
        'add' =>['username','password'],
        'edit' =>['username']
    ];
}